let re = /(a)*/g;

// const str = 'bcda';
const str = '#FFFFFF';
re = /#[0-9a-fA-F]{3}/;

console.log(re.test(str));

